package mbms.mobilebudget.entity;

import java.io.Serializable;
import java.util.Date;

import mbms.mobilebudget.entity.EnumValues.CurrencyType;
import mbms.mobilebudget.entity.EnumValues.ExpenseCategoryEnum;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName="expense")
public class Expense implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -171177746156466257L;
	
	@DatabaseField(generatedId = true)
	private Integer id;
	
	@DatabaseField
	private CurrencyType currencyType;
	
	@DatabaseField(canBeNull = false)
	private Double amount;
	
	@DatabaseField(canBeNull = false)
	private ExpenseCategoryEnum expenseCategory;
	
	@DatabaseField(canBeNull = false)
	private Date dateOfExpense;	
	
	@DatabaseField(canBeNull = true)
	private String expenseExplanation;
	
	@DatabaseField(foreign=true)
	private BankAccount bankAccount;
	
	@DatabaseField(foreign=true)
	private CreditCard creditCard;
	
	

	
	public Expense() {
	}
	
	
	public Expense(Integer id, CurrencyType currencyType, Double amount,
			ExpenseCategoryEnum expenseCategory, Date dateOfExpense,
			String expenseExplanation, BankAccount bankAccount,
			CreditCard creditCard) {
		super();
		this.id = id;
		this.currencyType = currencyType;
		this.amount = amount;
		this.expenseCategory = expenseCategory;
		this.dateOfExpense = dateOfExpense;
		this.expenseExplanation = expenseExplanation;
		this.bankAccount = bankAccount;
		this.creditCard = creditCard;
	}


	public CurrencyType getCurrencyType() {
		return currencyType;
	}
	public void setCurrencyType(CurrencyType currencyType) {
		this.currencyType = currencyType;
	}
	public BankAccount getBankAccount() {
		return bankAccount;
	}
	public void setBankAccount(BankAccount bankAccount) {
		this.bankAccount = bankAccount;
	}
	public CreditCard getCreditCard() {
		return creditCard;
	}
	public void setCreditCard(CreditCard creditCard) {
		this.creditCard = creditCard;
	}
	public Double getAmount() {
		return amount;
	}
	public void setAmount(Double amount) {
		this.amount = amount;
	}
	

	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public ExpenseCategoryEnum getExpenseCategory() {
		return expenseCategory;
	}
	public void setExpenseCategory(ExpenseCategoryEnum expenseCategory) {
		this.expenseCategory = expenseCategory;
	}
	public Date getDateOfExpense() {
		return dateOfExpense;
	}
	public void setDateOfExpense(Date dateOfExpense) {
		this.dateOfExpense = dateOfExpense;
	}
	public String getExpenseExplanation() {
		return expenseExplanation;
	}
	public void setExpenseExplanation(String expenseExplanation) {
		this.expenseExplanation = expenseExplanation;
	}

	
}
